package org.tinygroup.earthworm.util;

import org.tinygroup.earthworm.EarthWorm;
import org.tinygroup.earthworm.LogService;

public class EarthWormConfig {
	// 日志输出格式类，返回字符串，该字符串用于输出格式
	private static String logSupportClass = "org.tinygroup.earthworm.BaseLogSupport";
	// 取样器处理类，(返回true/false)用于记录此次是否记录
	private static String sampleTrierClass = "";
	// SS时，若当前线程中没有rpccontext，是否自己创建一个RPCContext
	boolean ssCreateIfNotExist = false;

	public static void setLogSupportClass(String clazz) {
		EarthWormConfig.logSupportClass = clazz;
		LogService.setLogSupport(clazz);
	}
	
	public static void setSampleTrierClass(String clazz){
		sampleTrierClass = clazz;
		EarthWorm.setSampleTrier(clazz);
		
	}
}
